<extend name="Public/common" />
<block name="body">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <tr>
            <td>&nbsp;&nbsp;&nbsp;&nbsp;
                <a href="__APP__/Member/memberList" style="font-size: 18px;font-weight: 600;color: #575757;" id="z1">用户列表</a>&nbsp;&nbsp;&nbsp;&nbsp;
                <a href="__APP__/Member/fankui" style="font-size: 18px;font-weight: 600;" id="z2">留言反馈</a>&nbsp;&nbsp;&nbsp;&nbsp;
                <a href="__APP__/Doc/user_money" style="font-size: 18px;font-weight: 600;color: #575757;" id="z3">财务明细</a>&nbsp;&nbsp;&nbsp;&nbsp;
                <a href="__APP__/Doc/user_tixian" style="font-size: 18px;font-weight: 600;color: #575757;" id="z4">提现申请</a>&nbsp;&nbsp;&nbsp;&nbsp;
                <a href="__APP__/Doc/user_shangjia" style="font-size: 18px;font-weight: 600;color: #575757;" id="z5">用户商品</a>&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
            <div class="ibox-content">
                <table class="table table-bordered" style="width: 80%;margin: auto;">
                    <thead>
                        <tr>
                            <th colspan="5"  style="text-align: center;">留言反馈</th>
                        </tr>
                        <h5 style="float: right;"><a href="javascript:location.reload();"><i class="fa fa-refresh"></i></a></h5>
                    </thead>
                    <tbody>                   
                    <tr>
                        <th></th>
                        <th>留言人名</th>
                        <th>留言内容</th>
                        <th>留言时间</th>
                        <th>操作</th>
                    </tr>
                    <form action="__APP__/member/fankui" method="post" id="fo">
                    <foreach name="message" item="v" key="k">
                    <tr>
                        <td>`
                            <input type="checkbox"  name="box[]" value="{$v.id}">
                        </td>
                        <td>{$v['uid']|liuyanren=$v['id'],###}</td>
                                           
                        <td>{$v.content}</td>
                                                        
                        <td>{$v.create_time}</td>  
         
                        <td class="rebbq">
                        		<input type="hidden" value='{$v.uid}' id="c{$k}"/>
                        		<input type="text"  id="d{$k}" name="content"/>
                        		<a href="#" onclick="huifu({$k})">
                        			<button type="button" class="btn btn-outline btn-default btn-xs">回复</button>
                        		</a>
                                <a href="{:U('member/delete',['id'=>$v['id'],'tableName'=>'message_board'])}" onclick="dele({$k})" class="ajax-delete" id="xiaoshi{$k}">
                                    <button type="button" class="btn btn-outline btn-warning btn-xs" style="margin-left:230px;">删除</button>
                                </a>
                        </td>
                    </tr>                  
                    </foreach>
                    <tr>
                        <td>
                            <input type="button" class="btn btn-info btn-xs" value="全选" id="all">&nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="button" class="btn btn-danger btn-xs" value="全部删除"  id="deleteAll"/>
                        </td>
                    </tr>
                    </form>
                    <tr align="center">
                    	<td colspan='5'>{$page}</td>
                    </tr>
                    </tbody>
                </table>
            </div>
    </div>
</div>
    <script type="text/javascript">
            var a=0
            $("#all").click(function () {
                a++
                $("input[name='box[]']").prop("checked",true)
                $("#all").attr("value","取消")
                if(a==2){
                    $("input[name='box[]']").prop("checked",false)
                    $("#all").attr("value","全选")
                    a=0
                }
            })
            $("#deleteAll").click(function () {
                $(".rebbq").remove()
                $("#fo").attr("action",'__APP__/Member/deleteadc')
                $("#fo").submit()
            })
            function huifu(e){
                a=$("#d"+e).val()
                c=$("#c"+e).attr("value")
                window.location.href='__APP__/member/fankui/content/'+a+'/uid/'+c;
            }
            function dele(e) {
                if(!confirm('这里是物理删除，不可恢复，确定删除吗？')){
                    $("#xiaoshi"+e).attr("href","#")
                    window.history.go(0)
                }
            }
    </script>
</block>
<script>	
    $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
</script>
<script src="__JS__/http/ajax.js">
</script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8">
</script>

